/**
 * THPS Dedicated Server
**/

#ifndef _MAIN_
    #define _MAIN_ 1

    //#include "thps.h"
    #include "data.h"

    /** Debugging **/
    #define DEBUG 1
    #define DEBUG_FILE NULL

    #define PORT 6116 // Whats our port?
    #define MAX_CONNECT 20000 // Read below
    /**

    tcp_max_syn_backlog
        The maximum number of queued connection requests which have still not received an
        acknowledgement from the connecting client.  If this number is exceeded, the kernel
        will begin dropping requests.  The default value of 256 is increased to 1024 when
        the memory present in the system is adequate or greater (>= 128Mb), and reduced to
        128 for those systems with very low memory (<= 32Mb).  It is recommended that if
        this needs to be increased above 1024, TCP_SYNQ_HSIZE in include/net/tcp.h be
        modified to keep TCP_SYNQ_HSIZE*16<=tcp_max_syn_backlog, and the kernel be
        recompiled.

    Use  int _sysctl(struct __sysctl_args * args ); To get tcp_max_syn_backlog // Linux?

    Microsoft says we shouldn't exceed 20,000. Protection against SYN flooding and SYN spoofing.

    More info : http://www.securityfocus.com/infocus/1729

    MinimumDynamicBacklog 	DWORD 	20
    MaximumDynamicBacklog 	DWORD 	20000

    **/


    /**
     * Our main.c functions
    **/

    /** Our thread routine **/
    THREAD( HandleClient, int sd );
    void DEBUG_PRINT( unsigned char *str, ... );

#endif
